home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / v cisle / htttrack / httrack-3.41-3.exe / {app} / src_win / WinHTTrack / inprogress.cpp < prev    next >
C/C++ Source or Header  |  2006-08-15  |  31KB  |  1,072 lines

  1. // inprogress.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Shell.h"
  6. #include "inprogress.h"
  7. #include "about.h"
  8. #include "iplog.h"
  9.  
  10. #include "NewProj.h"
  11. //#include "option.h"
  12.  
  13. /* Externe C */
  14. extern "C" {
  15.   #include "HTTrackInterface.h"
  16. }
  17.  
  18. #include "Wid1.h"
  19. #include "EasyDropTarget.h"
  20.  
  21. #include "InfoUrl.h"
  22.  
  23. extern CNewProj* dialog0;
  24. extern CMainTab* maintab;
  25.  
  26. extern int termine_requested;
  27. extern int termine;
  28. extern int soft_term_requested;
  29. extern HICON httrack_icon;
  30. extern int termine;
  31.  
  32. // Helper
  33. extern LaunchHelp* HtsHelper;
  34.  
  35. // InfoUrl
  36. extern CInfoUrl* _Cinprogress_inst;
  37.  
  38. #ifdef _DEBUG
  39. #define new DEBUG_NEW
  40. #undef THIS_FILE
  41. static char THIS_FILE[] = __FILE__;
  42. #endif
  43.  
  44. // Refresh
  45. //extern int INFILLMEM_LOCKED;     // refresh mΘmoire en cours
  46. extern InpInfo SInfo;
  47. int inprogress_refresh();
  48.  
  49. // this app
  50. #include "Winhttrack.h"
  51. extern CWinHTTrackApp* this_app;
  52.  
  53.  
  54. // objet
  55. extern Cinprogress* inprogress;
  56.  
  57.  
  58. /* pour la fin */
  59. #include "DialogContainer.h"
  60. #include "splitter.h"
  61. extern CSplitterFrame* this_CSplitterFrame;
  62. #include "infoend.h"
  63. extern Cinfoend* this_Cinfoend;
  64.  
  65. /* Main WizTab frame */
  66. #include "WizTab.h"
  67. extern CWizTab* this_CWizTab;
  68. extern CWizTab* this_intCWizTab;
  69.  
  70. // Pour la fin
  71. char end_mirror_msg[8192]="";
  72.  
  73. extern t_StatsBuffer StatsBuffer[NStatsBuffer];
  74.  
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // Cinprogress dialog
  78. IMPLEMENT_DYNCREATE(Cinprogress, CPropertyPage)
  79.  
  80.  
  81. Cinprogress::Cinprogress()
  82.     : CPropertyPage(Cinprogress::IDD)
  83. {
  84.   timer=0;
  85.   //{{AFX_DATA_INIT(Cinprogress)
  86.     m_inphide = FALSE;
  87.     //}}AFX_DATA_INIT
  88. }
  89.  
  90. void Cinprogress::DoDataExchange(CDataExchange* pDX)
  91. {
  92.     CPropertyPage::DoDataExchange(pDX);
  93.     //{{AFX_DATA_MAP(Cinprogress)
  94.     DDX_Control(pDX, IDC_nn9, m_nn9);
  95.     DDX_Control(pDX, IDC_nn8, m_nn8);
  96.     DDX_Control(pDX, IDC_nn7, m_nn7);
  97.     DDX_Control(pDX, IDC_nn6, m_nn6);
  98.     DDX_Control(pDX, IDC_nn5, m_nn5);
  99.     DDX_Control(pDX, IDC_nn4, m_nn4);
  100.     DDX_Control(pDX, IDC_nn3, m_nn3);
  101.     DDX_Control(pDX, IDC_nn2, m_nn2);
  102.     DDX_Control(pDX, IDC_nn13, m_nn13);
  103.     DDX_Control(pDX, IDC_nn12, m_nn12);
  104.     DDX_Control(pDX, IDC_nn11, m_nn11);
  105.     DDX_Control(pDX, IDC_nn10, m_nn10);
  106.     DDX_Control(pDX, IDC_nn1, m_nn1);
  107.     DDX_Control(pDX, IDC_nn0, m_nn0);
  108.     DDX_Control(pDX, IDC_nm13, m_nm13);
  109.     DDX_Control(pDX, IDC_nm12, m_nm12);
  110.     DDX_Control(pDX, IDC_nm11, m_nm11);
  111.     DDX_Control(pDX, IDC_nm10, m_nm10);
  112.     DDX_Control(pDX, IDC_nm9, m_nm9);
  113.     DDX_Control(pDX, IDC_nm8, m_nm8);
  114.     DDX_Control(pDX, IDC_nm7, m_nm7);
  115.     DDX_Control(pDX, IDC_nm6, m_nm6);
  116.     DDX_Control(pDX, IDC_nm5, m_nm5);
  117.     DDX_Control(pDX, IDC_nm4, m_nm4);
  118.     DDX_Control(pDX, IDC_nm3, m_nm3);
  119.     DDX_Control(pDX, IDC_nm2, m_nm2);
  120.     DDX_Control(pDX, IDC_nm1, m_nm1);
  121.     DDX_Control(pDX, IDC_nm0, m_nm0);
  122.     DDX_Control(pDX, IDC_st13, m_st13);
  123.     DDX_Control(pDX, IDC_st12, m_st12);
  124.     DDX_Control(pDX, IDC_st11, m_st11);
  125.     DDX_Control(pDX, IDC_st10, m_st10);
  126.     DDX_Control(pDX, IDC_st9, m_st9);
  127.     DDX_Control(pDX, IDC_st8, m_st8);
  128.     DDX_Control(pDX, IDC_st7, m_st7);
  129.     DDX_Control(pDX, IDC_st6, m_st6);
  130.     DDX_Control(pDX, IDC_st5, m_st5);
  131.     DDX_Control(pDX, IDC_st4, m_st4);
  132.     DDX_Control(pDX, IDC_st3, m_st3);
  133.     DDX_Control(pDX, IDC_st2, m_st2);
  134.     DDX_Control(pDX, IDC_st1, m_st1);
  135.     DDX_Control(pDX, IDC_st0, m_st0);
  136.     DDX_Control(pDX, IDC_sk0, m_sk0);
  137.     DDX_Control(pDX, IDC_sk1, m_sk1);
  138.     DDX_Control(pDX, IDC_sk2, m_sk2);
  139.     DDX_Control(pDX, IDC_sk3, m_sk3);
  140.     DDX_Control(pDX, IDC_sk4, m_sk4);
  141.     DDX_Control(pDX, IDC_sk5, m_sk5);
  142.     DDX_Control(pDX, IDC_sk6, m_sk6);
  143.     DDX_Control(pDX, IDC_sk7, m_sk7);
  144.     DDX_Control(pDX, IDC_sk8, m_sk8);
  145.     DDX_Control(pDX, IDC_sk9, m_sk9);
  146.     DDX_Control(pDX, IDC_sk10, m_sk10);
  147.     DDX_Control(pDX, IDC_sk11, m_sk11);
  148.     DDX_Control(pDX, IDC_sk12, m_sk12);
  149.     DDX_Control(pDX, IDC_sk13, m_sk13);
  150.     DDX_Control(pDX, IDC_sl0, m_sl0);
  151.     DDX_Control(pDX, IDC_sl1, m_sl1);
  152.     DDX_Control(pDX, IDC_sl2, m_sl2);
  153.     DDX_Control(pDX, IDC_sl3, m_sl3);
  154.     DDX_Control(pDX, IDC_sl4, m_sl4);
  155.     DDX_Control(pDX, IDC_sl5, m_sl5);
  156.     DDX_Control(pDX, IDC_sl6, m_sl6);
  157.     DDX_Control(pDX, IDC_sl7, m_sl7);
  158.     DDX_Control(pDX, IDC_sl8, m_sl8);
  159.     DDX_Control(pDX, IDC_sl9, m_sl9);
  160.     DDX_Control(pDX, IDC_sl10, m_sl10);
  161.     DDX_Control(pDX, IDC_sl11, m_sl11);
  162.     DDX_Control(pDX, IDC_sl12, m_sl12);
  163.     DDX_Control(pDX, IDC_sl13, m_sl13);
  164.     DDX_Check(pDX, IDC_inphide, m_inphide);
  165.     //}}AFX_DATA_MAP
  166. }
  167.  
  168. //const UINT wm_IcnRest = RegisterWindowMessage( FINDMSGSTRING );
  169. #define wm_CEasyDropTargetCallback (WM_USER + 2)
  170. #define wm_Timer (WM_USER + 3)
  171. #define wm_MirrorFinished (WM_USER + 4)
  172. BEGIN_MESSAGE_MAP(Cinprogress, CPropertyPage)
  173.     //{{AFX_MSG_MAP(Cinprogress)
  174.     ON_WM_CLOSE()
  175.     ON_BN_CLICKED(IDC_sk0, Onsk0)
  176.     ON_BN_CLICKED(IDC_sk1, Onsk1)
  177.     ON_BN_CLICKED(IDC_sk2, Onsk2)
  178.     ON_BN_CLICKED(IDC_sk3, Onsk3)
  179.     ON_BN_CLICKED(IDC_sk4, Onsk4)
  180.     ON_BN_CLICKED(IDC_sk5, Onsk5)
  181.     ON_BN_CLICKED(IDC_sk6, Onsk6)
  182.     ON_BN_CLICKED(IDC_sk7, Onsk7)
  183.     ON_BN_CLICKED(IDC_sk8, Onsk8)
  184.     ON_BN_CLICKED(IDC_sk9, Onsk9)
  185.     ON_BN_CLICKED(IDCANCEL, OnEscape)
  186.     ON_BN_CLICKED(IDC_ipabout, Onipabout)
  187.     ON_WM_DESTROY()
  188.     ON_WM_HELPINFO()
  189.     ON_BN_CLICKED(IDC_sk10, Onsk10)
  190.     ON_BN_CLICKED(IDC_sk11, Onsk11)
  191.     ON_BN_CLICKED(IDC_sk12, Onsk12)
  192.     ON_BN_CLICKED(IDC_sk13, Onsk13)
  193.     ON_WM_CREATE()
  194.     ON_BN_CLICKED(IDC_nm0, Onnm0)
  195.     ON_BN_CLICKED(IDC_nm1, Onnm1)
  196.     ON_BN_CLICKED(IDC_nm2, Onnm2)
  197.     ON_BN_CLICKED(IDC_nm3, Onnm3)
  198.     ON_BN_CLICKED(IDC_nm4, Onnm4)
  199.     ON_BN_CLICKED(IDC_nm5, Onnm5)
  200.     ON_BN_CLICKED(IDC_nm6, Onnm6)
  201.     ON_BN_CLICKED(IDC_nm7, Onnm7)
  202.     ON_BN_CLICKED(IDC_nm8, Onnm8)
  203.     ON_BN_CLICKED(IDC_nm9, Onnm9)
  204.     ON_BN_CLICKED(IDC_nm10, Onnm10)
  205.     ON_BN_CLICKED(IDC_nm11, Onnm11)
  206.     ON_BN_CLICKED(IDC_nm12, Onnm12)
  207.     ON_BN_CLICKED(IDC_nm13, Onnm13)
  208.     ON_BN_CLICKED(IDC_nn0, Onnm0)
  209.     ON_BN_CLICKED(IDC_nn1, Onnm1)
  210.     ON_BN_CLICKED(IDC_nn2, Onnm2)
  211.     ON_BN_CLICKED(IDC_nn3, Onnm3)
  212.     ON_BN_CLICKED(IDC_nn4, Onnm4)
  213.     ON_BN_CLICKED(IDC_nn5, Onnm5)
  214.     ON_BN_CLICKED(IDC_nn6, Onnm6)
  215.     ON_BN_CLICKED(IDC_nn7, Onnm7)
  216.     ON_BN_CLICKED(IDC_nn8, Onnm8)
  217.     ON_BN_CLICKED(IDC_nn9, Onnm9)
  218.     ON_BN_CLICKED(IDC_nn10, Onnm10)
  219.     ON_BN_CLICKED(IDC_nn11, Onnm11)
  220.     ON_BN_CLICKED(IDC_nn12, Onnm12)
  221.     ON_BN_CLICKED(IDC_nn13, Onnm13)
  222.   ON_BN_CLICKED(IDC_st0, Onst0)
  223.     ON_BN_CLICKED(IDC_st1, Onst1)
  224.     ON_BN_CLICKED(IDC_st2, Onst2)
  225.     ON_BN_CLICKED(IDC_st3, Onst3)
  226.     ON_BN_CLICKED(IDC_st4, Onst4)
  227.     ON_BN_CLICKED(IDC_st5, Onst5)
  228.     ON_BN_CLICKED(IDC_st6, Onst6)
  229.     ON_BN_CLICKED(IDC_st7, Onst7)
  230.     ON_BN_CLICKED(IDC_st8, Onst8)
  231.     ON_BN_CLICKED(IDC_st9, Onst9)
  232.     ON_BN_CLICKED(IDC_st10, Onst10)
  233.     ON_BN_CLICKED(IDC_st11, Onst11)
  234.     ON_BN_CLICKED(IDC_st12, Onst12)
  235.     ON_BN_CLICKED(IDC_st13, Onst13)
  236.     ON_WM_TIMER()
  237.     ON_BN_CLICKED(IDC_inphide, Oninphide)
  238.     //}}AFX_MSG_MAP
  239.   ON_MESSAGE( wm_CEasyDropTargetCallback, DragDropText)
  240.   ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify )
  241.   ON_BN_CLICKED(ID_ABOUT,Onipabout)
  242.   ON_BN_CLICKED(ID_FILE_EXIT,OnStopall)
  243.   ON_BN_CLICKED(ID_LOG_VIEWLOG,OniplogLog)
  244.   ON_BN_CLICKED(ID_LOG_VIEWERRORLOG,OniplogErr)
  245.   ON_BN_CLICKED(ID_LOG_VIEWTRANSFERS,OnViewTransfers)
  246.   ON_BN_CLICKED(ID_FILE_PAUSE,OnPause)
  247.   ON_BN_CLICKED(ID_OPTIONS_MODIFY,OnModifyOpt)
  248.   ON_COMMAND(ID_HELP_FINDER,OnHelpInfo2)
  249.   ON_COMMAND(ID_HELP,OnHelpInfo2)
  250.     ON_COMMAND(ID_DEFAULT_HELP,OnHelpInfo2)
  251.   // Fin du miroir
  252.   ON_MESSAGE( wm_MirrorFinished, OnEndMirror)
  253.   END_MESSAGE_MAP()
  254. //ON_REGISTERED_MESSAGE( wm_IcnRest, IconRestore )
  255. /////////////////////////////////////////////////////////////////////////////
  256. // Cinprogress message handlers
  257.  
  258. void Cinprogress::OnClose() 
  259. {
  260.   OnStopall();
  261. }
  262.  
  263. void Cinprogress::Onsk0()  {
  264.   if (hts_is_parsing(global_opt, -1)) {  // parsing
  265.     if (hts_is_testing(global_opt))
  266.       hts_cancel_test(global_opt);     // cancel test
  267.     /*else*/
  268.     hts_cancel_parsing(global_opt);  // cancel parsing
  269.   } else
  270.     StatsBuffer_cancel(0);
  271. }
  272. void Cinprogress::Onsk1()  {
  273.   StatsBuffer_cancel(1);
  274. }
  275. void Cinprogress::Onsk2()  {
  276.   StatsBuffer_cancel(2);
  277. }
  278. void Cinprogress::Onsk3()  {
  279.   StatsBuffer_cancel(3);
  280. }
  281. void Cinprogress::Onsk4()  {
  282.   StatsBuffer_cancel(4);
  283. }
  284. void Cinprogress::Onsk5()  {
  285.   StatsBuffer_cancel(5);
  286. }
  287. void Cinprogress::Onsk6()  {
  288.   StatsBuffer_cancel(6);
  289. }
  290. void Cinprogress::Onsk7()  {
  291.   StatsBuffer_cancel(7);
  292. }
  293. void Cinprogress::Onsk8()  {
  294.   StatsBuffer_cancel(8);
  295. }
  296. void Cinprogress::Onsk9()  {
  297.   StatsBuffer_cancel(9);
  298. }
  299. void Cinprogress::Onsk10()  {
  300.   StatsBuffer_cancel(10);
  301. }
  302. void Cinprogress::Onsk11()  {
  303.   StatsBuffer_cancel(11);
  304. }
  305. void Cinprogress::Onsk12()  {
  306.   StatsBuffer_cancel(12);
  307. }
  308. void Cinprogress::Onsk13()  {
  309.   StatsBuffer_cancel(13);
  310. }
  311.  
  312.  
  313. // Capture des static
  314. void Cinprogress::Onnm0()  { StatsBuffer_info(0); }
  315. void Cinprogress::Onnm1()  { StatsBuffer_info(1); }
  316. void Cinprogress::Onnm2()  { StatsBuffer_info(2); }
  317. void Cinprogress::Onnm3()  { StatsBuffer_info(3); }
  318. void Cinprogress::Onnm4()  { StatsBuffer_info(4); }
  319. void Cinprogress::Onnm5()  { StatsBuffer_info(5); }
  320. void Cinprogress::Onnm6()  { StatsBuffer_info(6); }
  321. void Cinprogress::Onnm7()  { StatsBuffer_info(7); }
  322. void Cinprogress::Onnm8()  { StatsBuffer_info(8); }
  323. void Cinprogress::Onnm9()  { StatsBuffer_info(9); }
  324. void Cinprogress::Onnm10() { StatsBuffer_info(10); }
  325. void Cinprogress::Onnm11() { StatsBuffer_info(11); }
  326. void Cinprogress::Onnm12() { StatsBuffer_info(12); }
  327. void Cinprogress::Onnm13() { StatsBuffer_info(13); }
  328.  
  329. void Cinprogress::Onst0()  { StatsBuffer_info(0); }
  330. void Cinprogress::Onst1()  { StatsBuffer_info(1); }
  331. void Cinprogress::Onst2()  { StatsBuffer_info(2); }
  332. void Cinprogress::Onst3()  { StatsBuffer_info(3); }
  333. void Cinprogress::Onst4()  { StatsBuffer_info(4); }
  334. void Cinprogress::Onst5()  { StatsBuffer_info(5); }
  335. void Cinprogress::Onst6()  { StatsBuffer_info(6); }
  336. void Cinprogress::Onst7()  { StatsBuffer_info(7); }
  337. void Cinprogress::Onst8()  { StatsBuffer_info(8); }
  338. void Cinprogress::Onst9()  { StatsBuffer_info(9); }
  339. void Cinprogress::Onst10() { StatsBuffer_info(10); }
  340. void Cinprogress::Onst11() { StatsBuffer_info(11); }
  341. void Cinprogress::Onst12() { StatsBuffer_info(12); }
  342. void Cinprogress::Onst13() { StatsBuffer_info(13); }
  343.  
  344. // touche escape
  345. void Cinprogress::OnEscape() { 
  346.   OnStopall();
  347. }
  348.  
  349. void Cinprogress::OnStopall() 
  350. {
  351.   this_CSplitterFrame->CheckRestore();
  352.   if (AfxMessageBox(
  353.     LANG(LANG_H1 /*"Stop WinHTTrack?",
  354.            "Stopper WinHTTrack?"*/)
  355.     ,MB_OKCANCEL+MB_ICONQUESTION)==IDOK) {
  356.     hts_setpause(global_opt, 0);
  357.     if (soft_term_requested)
  358.       termine_requested=1;
  359.     else {
  360.       soft_term_requested=1;
  361.       hts_request_stop(global_opt, 0);
  362.     }
  363.   }
  364. }
  365.  
  366. void Cinprogress::Onipabout() 
  367. {
  368.   Cabout about;
  369.   about.DoModal();
  370. }
  371.  
  372. void Cinprogress::OnDestroy() 
  373. {
  374.   //((CWnd*)this)->m_pCtrlCont->OnUIActivate(NULL);
  375.   WHTT_LOCK();
  376.   termine_requested=1;    // quit!
  377.   WHTT_UNLOCK();
  378.   StopTimer();
  379.   if (BackAffLog)
  380.   if (form.m_hWnd)
  381.     form.EndDialog(IDOK);       // terminer!
  382.   this_CSplitterFrame->CheckRestore();
  383.   //Sleep(150);             // Θvite les problΦmes d'accΦs α m_hWnd juste avant le destroy
  384.   CPropertyPage::OnDestroy();
  385. }
  386.  
  387. BOOL Cinprogress::OnInitDialog() 
  388. {
  389.   m_inphide=TRUE;
  390.   UpdateData(false);      // force to call DoDataExchange
  391.   inprogress=this;
  392.  
  393.   memset(&SInfo, 0, sizeof(SInfo));
  394.  
  395.   BackAffLog=NULL;
  396.   strcpybuff(pathlog,"");
  397.  
  398.     //CPropertyPage::OnInitDialog();
  399.   EnableToolTips(true);     // TOOL TIPS
  400.  
  401.   // initialisation des champs pour les redraws en boucle
  402.   element[0][0]=&m_st0;
  403.   element[0][1]=&m_st1;
  404.   element[0][2]=&m_st2;
  405.   element[0][3]=&m_st3;
  406.   element[0][4]=&m_st4;
  407.   element[0][5]=&m_st5;
  408.   element[0][6]=&m_st6;
  409.   element[0][7]=&m_st7;
  410.   element[0][8]=&m_st8;
  411.   element[0][9]=&m_st9;
  412.   element[0][10]=&m_st10;
  413.   element[0][11]=&m_st11;
  414.   element[0][12]=&m_st12;
  415.   element[0][13]=&m_st13;
  416.  
  417.   element[1][0]=&m_nm0;
  418.   element[1][1]=&m_nm1;
  419.   element[1][2]=&m_nm2;
  420.   element[1][3]=&m_nm3;
  421.   element[1][4]=&m_nm4;
  422.   element[1][5]=&m_nm5;
  423.   element[1][6]=&m_nm6;
  424.   element[1][7]=&m_nm7;
  425.   element[1][8]=&m_nm8;
  426.   element[1][9]=&m_nm9;
  427.   element[1][10]=&m_nm10;
  428.   element[1][11]=&m_nm11;
  429.   element[1][12]=&m_nm12;
  430.   element[1][13]=&m_nm13;
  431.  
  432.   // rajoutΘ
  433.   element[4][0]=&m_nn0;
  434.   element[4][1]=&m_nn1;
  435.   element[4][2]=&m_nn2;
  436.   element[4][3]=&m_nn3;
  437.   element[4][4]=&m_nn4;
  438.   element[4][5]=&m_nn5;
  439.   element[4][6]=&m_nn6;
  440.   element[4][7]=&m_nn7;
  441.   element[4][8]=&m_nn8;
  442.   element[4][9]=&m_nn9;
  443.   element[4][10]=&m_nn10;
  444.   element[4][11]=&m_nn11;
  445.   element[4][12]=&m_nn12;
  446.   element[4][13]=&m_nn13;
  447.  
  448.   element[2][0]=&m_sl0;
  449.   element[2][1]=&m_sl1;
  450.   element[2][2]=&m_sl2;
  451.   element[2][3]=&m_sl3;
  452.   element[2][4]=&m_sl4;
  453.   element[2][5]=&m_sl5;
  454.   element[2][6]=&m_sl6;
  455.   element[2][7]=&m_sl7;
  456.   element[2][8]=&m_sl8;
  457.   element[2][9]=&m_sl9;
  458.   element[2][10]=&m_sl10;
  459.   element[2][11]=&m_sl11;
  460.   element[2][12]=&m_sl12;
  461.   element[2][13]=&m_sl13;
  462.  
  463.   element[3][0]=&m_sk0;
  464.   element[3][1]=&m_sk1;
  465.   element[3][2]=&m_sk2;
  466.   element[3][3]=&m_sk3;
  467.   element[3][4]=&m_sk4;
  468.   element[3][5]=&m_sk5;
  469.   element[3][6]=&m_sk6;
  470.   element[3][7]=&m_sk7;
  471.   element[3][8]=&m_sk8;
  472.   element[3][9]=&m_sk9;
  473.   element[3][10]=&m_sk10;
  474.   element[3][11]=&m_sk11;
  475.   element[3][12]=&m_sk12;
  476.   element[3][13]=&m_sk13;
  477.  
  478.   /* Init checkbox */
  479.   CMenu* m;
  480.   if (m = AfxGetApp()->GetMainWnd()->GetMenu()) {
  481.     m->CheckMenuItem(ID_FILE_PAUSE,MF_UNCHECKED);
  482.   }
  483.  
  484.   // Patcher l'interface pour les Franτais ;-)
  485.   if (LANG_T(-1)) {    // Patcher en franτais
  486.     //SetDlgItemTextCP(this, ,"");
  487.     SetDlgItemTextCP(this, IDC_STATIC_bytes,LANG(LANG_H8) /*"Octets sauvΘs:"*/);
  488.     SetDlgItemTextCP(this, IDC_STATIC_scanned,LANG(LANG_H9) /*"Liens parcourus:"*/);
  489.     SetDlgItemTextCP(this, IDC_STATIC_time,LANG(LANG_H10) /*"Temps:"*/);
  490.     SetDlgItemTextCP(this, IDC_STATIC_sockets,LANG(LANG_H11) /*"Connexions:"*/);
  491.     SetDlgItemTextCP(this, IDC_inphide,LANG(LANG_H12) /*"En cours:"*/);
  492.     SetDlgItemTextCP(this, IDC_STATIC_informations,LANG_H16);   
  493.     SetDlgItemTextCP(this, IDC_STATIC_written,LANG_H17);   
  494.     SetDlgItemTextCP(this, IDC_STATIC_updated,LANG_H18);   
  495.     SetDlgItemTextCP(this, IDC_STATIC_errors,LANG_H19);    
  496.     SetDlgItemTextCP(this, IDC_STATIC_inprog,LANG_H20);    
  497.     //SetDlgItemTextCP(this, IDC_hide,LANG(LANG_H13) /*"Cacher"*/);
  498.     SetDlgItemTextCP(this, IDC_STATIC_trate,LANG(LANG_H14) /*"Taux transfert"*/);
  499.     for(int i=0;i<NStatsBuffer;i++)
  500.       SetWindowTextCP(element[3][i], LANG(LANG_H15));
  501.   }
  502.  
  503.   /*
  504.   {
  505.     LOGFONT lf;
  506.     if (element[0][0]->GetFont()->GetLogFont(&lf)) {
  507.       CFont* fnt = new CFont();
  508.       if (fnt->CreateFont(lf.lfHeight,0,0,0,FW_DONTCARE,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Fixedsys")) {
  509.         int i;
  510.         for (i=0;i<NStatsBuffer; i++) {
  511.           element[0][i]->SetFont(fnt,true);
  512.           element[1][i]->SetFont(fnt,true);
  513.         }
  514.       }
  515.     }
  516.   }
  517.   */
  518.  
  519.   SetIcon(httrack_icon,false);
  520.   SetIcon(httrack_icon,true);  
  521.  
  522.   if (ShellOptions != NULL && ShellOptions->choixdeb[0] == '!')
  523.     Oniplog(0);           // ouvrir log
  524.  
  525.   // Lancer timer!
  526.   StartTimer();
  527.  
  528.     return TRUE;  // return TRUE unless you set the focus to a control
  529.                   // EXCEPTION: OCX Property Pages should return FALSE
  530. }
  531.  
  532. void Cinprogress::StartTimer() {
  533.   if (!timer) {
  534.     timer=SetTimer(WM_TIMER,HTS_SLEEP_WIN,NULL);
  535.   }
  536. }
  537. void Cinprogress::StopTimer() {
  538.   if (timer) {
  539.     KillTimer(timer);
  540.     timer=0;
  541.   }
  542. }
  543.  
  544. UINT AffLog( LPVOID pP ) {
  545.   Cinprogress* inp = (Cinprogress*) pP;
  546.   if (inp != NULL) {
  547.     inp->form.m_iplog=(CString) "No log report";
  548.     inp->form.DoModal();
  549.     inp->BackAffLog = NULL;
  550.   }
  551.   return 0;    // thread completed successfully
  552. }
  553.  
  554. // log pour fichiers d'erreur et de log
  555. void Cinprogress::OniplogLog() {
  556.   Oniplog(0);
  557. }
  558. void Cinprogress::OniplogErr() {
  559.   Oniplog(1);
  560. }
  561.  
  562. void Cinprogress::Oniplog(int mode)  {
  563.     char catbuff[CATBUFF_SIZE];
  564.   if (!BackAffLog) {  // pas encore lancΘ
  565.     strcpybuff(pathlog,dialog0->GetPath());
  566.     if (strlen(pathlog)>0)
  567.     if ((pathlog[strlen(pathlog)-1]!='/') && (pathlog[strlen(pathlog)-1]!='\\'))
  568.       strcatbuff(pathlog,"/");
  569.     // fichier log existe ou on est tΘlΘcommandΘ par un !
  570.     if ( (fexist(fconcat(catbuff,pathlog,"hts-err.txt"))) || (fexist(fconcat(catbuff,pathlog,"hts-log.txt"))) || (ShellOptions != NULL && ShellOptions->choixdeb[0]=='!') ) {
  571.       if (mode)
  572.         form.type_log=0;
  573.       else
  574.         form.type_log=1;
  575.       strcpybuff(form.pathlog,pathlog);
  576.       BackAffLog = AfxBeginThread(AffLog,this);
  577.     } else {
  578.       char s[1024];
  579.       sprintf(s,LANG(LANG_H2 /*"No log files in %s!","Aucun fichier d'audit dans %s!"*/),pathlog);
  580.       AfxMessageBox(s,MB_OK+MB_ICONEXCLAMATION);
  581.     }
  582.   }
  583. }
  584.  
  585. void Cinprogress::OnViewTransfers() 
  586. {
  587.   StatsBuffer_info(0);
  588. }
  589.  
  590. void Cinprogress::OnPause() 
  591. {
  592.   //int m;
  593.   //if (!hts_setpause(-1))
  594.   //  m=AfxMessageBox(LANG(LANG_H3 /*"Pause Transfer?","Placer le transfert sur pause?"*/),MB_OKCANCEL+MB_ICONQUESTION);
  595.   //else
  596.   //  m=IDOK;
  597.   //if (m==IDOK) {
  598.     hts_setpause(global_opt, !hts_setpause(global_opt, -1));
  599.     CMenu* m;
  600.     if (m = AfxGetApp()->GetMainWnd()->GetMenu()) {
  601.         if (hts_setpause(global_opt, -1))
  602.             m->CheckMenuItem(ID_FILE_PAUSE,MF_CHECKED);
  603.         else
  604.             m->CheckMenuItem(ID_FILE_PAUSE,MF_UNCHECKED);
  605.     }
  606.   //}
  607. }
  608.  
  609. // modif options
  610. void Cinprogress::OnModifyOpt() 
  611. {
  612.   //
  613.   maintab->m_option1.modify=
  614.     maintab->m_option2.modify=
  615.     maintab->m_option3.modify=
  616.     maintab->m_option7.modify=
  617.     maintab->m_option8.modify=
  618.     maintab->m_option9.modify=
  619.     maintab->m_option11.modify=
  620.     maintab->m_option10.modify=1;    // mode modification
  621.   if (maintab->DoModal() == IDOK) {
  622.     int n;
  623.     LLint ln;
  624.     float nf;
  625.  
  626.     httrackp *opt = hts_create_opt();
  627.     opt->log = opt->errlog = NULL;
  628.  
  629.     // dΘvalider champs (non modifiΘs)
  630.     opt->maxsite = -1;
  631.     opt->maxfile_nonhtml = -1;
  632.     opt->maxfile_html = -1;
  633.     opt->maxsoc = -1;
  634.     opt->nearlink = -1;
  635.     opt->timeout = -1;
  636.     opt->rateout = -1;
  637.     opt->maxtime = -1;
  638.         opt->mms_maxtime = -1;
  639.     opt->maxrate = -1;
  640.     StringClear(opt->user_agent);
  641.     opt->retry = -1;
  642.     opt->hostcontrol = -1;
  643.     opt->errpage = -1;
  644.     opt->travel = -1;
  645.     opt->external = -1;
  646.     opt->delete_old=-1;
  647.     opt->parseall=-1;
  648.     opt->delete_old=-1;
  649.  
  650.     opt->travel=0;         // NOTE: NE SERA PRIS EN COMPTE QUE LE BIT 8
  651.     if(maintab->m_option1.m_testall)
  652.       opt->travel|=256;     
  653.  
  654.     if(maintab->m_option1.m_parseall)
  655.       opt->parseall=1;     
  656.     else
  657.       opt->parseall=0;     
  658.  
  659.     // near link,err page
  660.     if (maintab->m_option1.m_link)
  661.       opt->nearlink=1;
  662.     else
  663.       opt->nearlink=0;
  664.  
  665.     if (maintab->m_option2.m_errpage)
  666.       opt->errpage=1;
  667.     else
  668.       opt->errpage=0;
  669.  
  670.     if (maintab->m_option2.m_external)
  671.       opt->external=1;
  672.     else
  673.       opt->external=0;
  674.  
  675.     if (maintab->m_option2.m_nopurge)
  676.       opt->delete_old=1;
  677.     else
  678.       opt->delete_old=0;
  679.  
  680.  
  681.     // host control
  682.     {
  683.       int a=0;
  684.       if (maintab->m_option4.m_remt)
  685.         a+=1;
  686.       if (maintab->m_option4.m_rems)
  687.         a+=2;
  688.       opt->hostcontrol=a;
  689.     }
  690.  
  691.     // sockets
  692.     if (strcmp(maintab->m_option4.m_connexion,"")!=0) {
  693.       if (sscanf(maintab->m_option4.m_connexion,"%d",&n) == 1)
  694.         opt->maxsoc = n;
  695.     } 
  696.  
  697.     // maxfile_nonhtml
  698.     if (strcmp(maintab->m_option5.m_othermax,"")!=0) {
  699.       if (sscanf(maintab->m_option5.m_othermax,LLintP,&ln) == 1)
  700.         opt->maxfile_nonhtml = ln;
  701.     } else
  702.       opt->maxfile_nonhtml = -1;
  703.  
  704.     // maxfile_html
  705.     if (strcmp(maintab->m_option5.m_maxhtml,"")!=0) {
  706.       if (sscanf(maintab->m_option5.m_maxhtml,LLintP,&ln) == 1)
  707.         opt->maxfile_html = ln;
  708.     } else
  709.       opt->maxfile_html = -1;
  710.  
  711.     // maxsite
  712.     if (strcmp(maintab->m_option5.m_sizemax,"")!=0) {
  713.       if (sscanf(maintab->m_option5.m_sizemax,LLintP,&ln) == 1)
  714.         opt->maxsite = ln;
  715.     } else
  716.       opt->maxsite = -1;
  717.  
  718.     // fragment
  719.     if (strcmp(maintab->m_option5.m_pausebytes,"")!=0) {
  720.       if (sscanf(maintab->m_option5.m_pausebytes,LLintP,&ln) == 1)
  721.         opt->fragment = ln;
  722.     } else
  723.       opt->fragment = -1;
  724.  
  725.     // timeout
  726.     if (strcmp(maintab->m_option4.m_timeout,"")!=0) {
  727.       if (sscanf(maintab->m_option4.m_timeout,"%d",&n) == 1)
  728.         opt->timeout = n;
  729.     } else
  730.       opt->timeout = -1;
  731.  
  732.     // rateout
  733.     if (strcmp(maintab->m_option4.m_rate,"")!=0) {
  734.       if (sscanf(maintab->m_option4.m_rate,"%d",&n) == 1)
  735.         opt->rateout = n;
  736.     } else
  737.       opt->rateout = -1;
  738.  
  739.     // maxtime
  740.     if (strcmp(maintab->m_option5.m_maxtime,"")!=0) {
  741.       if (sscanf(maintab->m_option5.m_maxtime,"%d",&n) == 1)
  742.         opt->maxtime = n;
  743.     } else
  744.       opt->maxtime = -1;
  745.  
  746.     // maxrate
  747.     if (strcmp(maintab->m_option5.m_maxrate,"")!=0) {
  748.       if (sscanf(maintab->m_option5.m_maxrate,"%d",&n) == 1)
  749.         opt->maxrate = n;
  750.     } else
  751.       opt->maxrate = -1;
  752.  
  753.     // max. connect
  754.     if (strcmp(maintab->m_option5.m_maxconn,"")!=0) {
  755.       if (sscanf(maintab->m_option5.m_maxconn,"%f",&nf) == 1)
  756.         opt->maxconn = nf;
  757.     } else
  758.       opt->maxconn = -1;
  759.  
  760.     // retry
  761.     if (strcmp(maintab->m_option4.m_retry,"")!=0) {
  762.       if (sscanf(maintab->m_option4.m_retry,"%d",&n) == 1)
  763.         opt->retry = n;
  764.     } else
  765.       opt->retry = -1;
  766.  
  767.     // user_agent
  768.     if (strcmp(maintab->m_option6.m_user,"")!=0) {
  769.       StringCopy(opt->user_agent, maintab->m_option6.m_user);
  770.     }
  771.  
  772.         if (global_opt != NULL) {
  773.             copy_htsopt(opt, global_opt);
  774.         }
  775.  
  776.     hts_free_opt(opt);
  777.   }
  778.   maintab->m_option1.modify=
  779.     maintab->m_option2.modify=
  780.     maintab->m_option3.modify=
  781.     maintab->m_option7.modify=
  782.     maintab->m_option8.modify=
  783.     maintab->m_option9.modify=
  784.     maintab->m_option11.modify=
  785.     maintab->m_option10.modify=0;
  786. }
  787.  
  788.  
  789.  
  790. // canceller un lien manuellement
  791. void Cinprogress::StatsBuffer_cancel(int id) {
  792.   hts_cancel_file_push(global_opt, StatsBuffer[id].url_sav);
  793. }
  794. void Cinprogress::StatsBuffer_info(int id) {
  795.   WHTT_LOCK();
  796.   if ((!termine) && (!termine_requested) && (inprogress->m_hWnd)) {
  797.     if (SInfo.stat_time>0) {
  798.       if (StatsBuffer[id].etat[0]) {
  799.         CInfoUrl box;
  800.         box.id=StatsBuffer[id].back;
  801.         _Cinprogress_inst=&box;
  802.         WHTT_UNLOCK();
  803.         {
  804.           box.DoModal();
  805.           _Cinprogress_inst=NULL;
  806.         }
  807.         return;
  808.       }
  809.     }
  810.   }
  811.   WHTT_UNLOCK();
  812. }
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820. // ------------------------------------------------------------
  821. // TOOL TIPS
  822. //
  823. // ajouter dans le .cpp:
  824. // remplacer les deux Wid1:: par le nom de la classe::
  825. // dans la message map, ajouter
  826. // ON_NOTIFY_EX( TTN_NEEDTEXT, 0, OnToolTipNotify )
  827. // dans initdialog ajouter
  828. // EnableToolTips(true);     // TOOL TIPS
  829. //
  830. // ajouter dans le .h:
  831. // char* GetTip(int id);
  832. // et en generated message map
  833. // afx_msg BOOL OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult );
  834. BOOL Cinprogress::OnToolTipNotify( UINT id, NMHDR * pNMHDR, LRESULT * pResult )
  835. {
  836.   TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
  837.   UINT_PTR nID =pNMHDR->idFrom;
  838.   if (pTTT->uFlags & TTF_IDISHWND)
  839.   {
  840.     // idFrom is actually the HWND of the tool
  841.     nID = ::GetDlgCtrlID((HWND)nID);
  842.     if(nID)
  843.     {
  844.       char* st=GetTip((int)nID);
  845.       if (st != "") {
  846.         pTTT->lpszText = st;
  847.         pTTT->hinst = AfxGetResourceHandle();
  848.         return(TRUE);
  849.       }
  850.     }
  851.   }
  852.   return(FALSE);
  853. }
  854. char* Cinprogress::GetTip(int ID)
  855. {
  856.   switch(ID) {
  857.     //case IDC_STOPALL: return LANG(LANG_H4); break; // "Stop the mirror","Stopper le miroir"); break;
  858.     //case IDC_hide:    return LANG(LANG_H5); break; // "Hide this window behind the system tray","Cacher la fenΩtre dans la barre systΦme"); break;
  859.     case IDC_sk0:     return LANG(LANG_H6); break; // "Click to skip a link or interrupt parsing","Clic pour sauter un lien ou interrompre"); break;
  860.     case IDC_sk1: case IDC_sk2: case IDC_sk3: case IDC_sk4:
  861.     case IDC_sk5: case IDC_sk6: case IDC_sk7: case IDC_sk8: case IDC_sk9:
  862.                       return LANG(LANG_H7); break; // "Click to skip a link","Clic pour sauter un lien"); break;
  863.                       //
  864.   }
  865.   return "";
  866. }
  867. // TOOL TIPS
  868. // ------------------------------------------------------------
  869.  
  870.  
  871.  
  872. // Appel aide
  873. void Cinprogress::OnHelpInfo2() {
  874.   (void)OnHelpInfo(NULL);
  875. }
  876.  
  877. BOOL Cinprogress::OnHelpInfo(HELPINFO* dummy) 
  878. {
  879.   //return CPropertyPage::OnHelpInfo(pHelpInfo);
  880.   HtsHelper->Help();
  881.   return true;
  882.   //AfxGetApp()->WinHelp(0,HELP_FINDER);    // Index du fichier Hlp
  883.   //return true;
  884. }
  885.  
  886.  
  887. int Cinprogress::OnCreate(LPCREATESTRUCT lpCreateStruct) 
  888. {
  889.     if (CPropertyPage::OnCreate(lpCreateStruct) == -1)
  890.         return -1;
  891.  
  892.   // Drag&Drop
  893.   drag=new CEasyDropTarget(this);
  894.   if (drag->IsRegistered()) {
  895.     drag->SetTextCallback(wm_CEasyDropTargetCallback);
  896.   }
  897.     
  898.     return 0;
  899. }
  900.  
  901.  
  902. // Message from CEasyDropTarget
  903. LRESULT Cinprogress::DragDropText(WPARAM wParam,LPARAM lParam) {
  904.   if (lParam) {
  905.     CString st=*((CString*) lParam);
  906.     CLIPFORMAT cfFormat = (CLIPFORMAT) wParam;
  907.     st=Wid1::TextToUrl(st,cfFormat);
  908.     if (st=="")
  909.       AfxMessageBox(LANG(LANG_DIAL11),MB_SYSTEMMODAL);
  910.     else {
  911.       CString aff=LANG(LANG_DIAL12);
  912.       if (AfxMessageBox(aff+st,MB_SYSTEMMODAL|MB_YESNO|MB_ICONQUESTION)==IDYES) {
  913.         int pause=0;
  914.         char** tab=CEasyDropTarget::StringToArray(st);
  915.         hts_addurl(global_opt, tab);
  916.         if (pause=hts_setpause(global_opt, -1))
  917.           hts_setpause(global_opt, 0);      // enlever pause
  918.         {
  919.           int i=0;
  920.           while((hts_addurl(global_opt, NULL)) && (i<100)) {
  921.             Sleep(100);
  922.             i++;
  923.           }
  924.           if (!(i<100)) {
  925.             hts_resetaddurl(global_opt);
  926.             AfxMessageBox(LANG(LANG_DIAL13));
  927.           }
  928.           hts_setpause(global_opt, pause);      // remettre pause Θventuelle
  929.         }
  930.         CEasyDropTarget::ReleaseStringToArray(tab);
  931.         tab=NULL;
  932.       }
  933.     }
  934.   }
  935.   return 0;
  936. }
  937.  
  938. // Refresh
  939. void Cinprogress::OnTimer(UINT nIDEvent) 
  940. {
  941.   WHTT_LOCK();
  942.   if (!termine) {
  943.     if (SInfo.refresh) {
  944.       hts_is_parsing(global_opt, 0);        // refresh demandΘ si en mode parsing
  945.       // while(INFILLMEM_LOCKED) Sleep(10);    // attendre au cas o∙
  946.       if (!termine)
  947.         inprogress_refresh();        // on refresh!
  948.     }
  949.     SInfo.ask_refresh=1;
  950.   }
  951.   WHTT_UNLOCK();
  952.   CPropertyPage::OnTimer(nIDEvent);
  953. }
  954.  
  955. BOOL Cinprogress::DestroyWindow() 
  956. {
  957.   StopTimer();
  958.   inprogress=NULL;
  959.   delete drag;
  960.     return CPropertyPage::DestroyWindow();
  961. }
  962.  
  963. // Fin
  964.  
  965. LRESULT Cinprogress::OnEndMirror(WPARAM /* wP*/, LPARAM /*lP*/) {
  966.     char catbuff[CATBUFF_SIZE];
  967.     char catbuff2[CATBUFF_SIZE];
  968.   //this_CSplitterFrame->SetNewView(0,1,RUNTIME_CLASS(Cinfoend));
  969.  
  970.   // Copie de trans.cpp
  971.   this_CWizTab->ModifyStyle(WS_VISIBLE,0,0);
  972.   this_CWizTab->RedrawWindow();
  973.   //
  974.   //{
  975.   //  CWizTab* tmp;
  976.   //  tmp=this_CWizTab;
  977.   this_CWizTab=this_intCWizTab;
  978.   //  this_CWizTab2=tmp;
  979.   //}
  980.   //
  981.   this_CWizTab->ModifyStyle(0,WS_VISIBLE,0);
  982.   this_CWizTab->ModifyStyle(WS_DISABLED,0,0);
  983.   this_CSplitterFrame->RedrawWindow();
  984.   // Fin de Copie de trans.cpp
  985.  
  986.   this_CWizTab->EndInProgress();
  987.   if (IsWindow(this_Cinfoend->m_hWnd))
  988.     SetDlgItemTextCP(this_Cinfoend, IDC_infoend,end_mirror_msg);
  989.  
  990.   if (hts_is_exiting(global_opt) == 1) {     /* Interrupted mirror! */
  991.     char pathlog[HTS_URLMAXSIZE*2];
  992.     strcpybuff(pathlog,dialog0->GetPath());
  993.     if (strlen(pathlog)>0) {
  994.       if ((pathlog[strlen(pathlog)-1]!='/') && (pathlog[strlen(pathlog)-1]!='\\'))
  995.         strcatbuff(pathlog,"/");
  996.     }
  997.     // Aborted updated.. restore old cache?!
  998.     if ( 
  999.       fexist(fconcat(catbuff,pathlog,"hts-cache/old.zip"))
  1000.       ||
  1001.       (fexist(fconcat(catbuff,pathlog,"hts-cache/old.dat"))) && (fexist(fconcat(catbuff,pathlog,"hts-cache/old.ndx"))) 
  1002.       ) {
  1003.       if (AfxMessageBox(LANG_F22b,MB_YESNO|MB_DEFBUTTON2) == IDYES) {
  1004.         if (fexist(fconcat(catbuff,pathlog,"hts-cache/old.dat")) && fexist(fconcat(catbuff,pathlog,"hts-cache/old.ndx"))) {
  1005.           if (remove(fconcat(catbuff,pathlog,"hts-cache/new.dat"))) {
  1006.             AfxMessageBox(LANG_F24 );
  1007.           }
  1008.           if (remove(fconcat(catbuff,pathlog,"hts-cache/new.ndx"))) {
  1009.             AfxMessageBox(LANG_F24 );
  1010.           }
  1011.         }
  1012.         if (remove(fconcat(catbuff,pathlog,"hts-cache/new.lst"))) {
  1013.           AfxMessageBox(LANG_F24 );
  1014.         }
  1015.         if (fexist(fconcat(catbuff,pathlog,"hts-cache/old.zip"))) {
  1016.           if (remove(fconcat(catbuff,pathlog,"hts-cache/new.zip"))) {
  1017.             AfxMessageBox(LANG_F24 );
  1018.           }
  1019.         }
  1020.         remove(fconcat(catbuff,pathlog,"hts-cache/new.txt"));
  1021.         rename(fconcat(catbuff,pathlog,"hts-cache/old.zip"),fconcat(catbuff2,pathlog,"hts-cache/new.zip"));
  1022.         rename(fconcat(catbuff,pathlog,"hts-cache/old.dat"),fconcat(catbuff2,pathlog,"hts-cache/new.dat"));
  1023.         rename(fconcat(catbuff,pathlog,"hts-cache/old.ndx"),fconcat(catbuff2,pathlog,"hts-cache/new.ndx"));
  1024.         rename(fconcat(catbuff,pathlog,"hts-cache/old.lst"),fconcat(catbuff2,pathlog,"hts-cache/new.lst"));
  1025.         rename(fconcat(catbuff,pathlog,"hts-cache/old.txt"),fconcat(catbuff2,pathlog,"hts-cache/new.txt"));
  1026.       }
  1027.     }
  1028.   } else if (hts_is_exiting(global_opt) == 2) {     /* No connection! */
  1029.     AfxMessageBox(LANG_F22c );
  1030.   }
  1031.   return S_OK;
  1032. }
  1033.  
  1034. BOOL Cinprogress::OnQueryCancel( ) {
  1035.   OnStopall();
  1036.   //this_CSplitterFrame->SetNewView(0,1,RUNTIME_CLASS(CDialogContainer));
  1037.   return FALSE;
  1038. }
  1039.  
  1040.  
  1041. void Cinprogress::Oninphide() 
  1042. {
  1043.   int status=IsDlgButtonChecked(IDC_inphide);
  1044.   if (status) {
  1045.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(WS_DISABLED,0);  // disabled
  1046.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(0,WS_VISIBLE);   // not visible
  1047.   } else {
  1048.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(0,WS_DISABLED);  // not disabled
  1049.     GetDlgItem(IDC_STATIC_actions)->ModifyStyle(WS_VISIBLE,0);   // visible
  1050.   }
  1051.   int i;
  1052.   for(i=0;i<NStatsBuffer;i++) {
  1053.     int j;
  1054.     for(j=0;j<5;j++) {
  1055.       if (status) {
  1056.         inprogress->element[j][i]->ModifyStyle(WS_DISABLED,0);  // disabled
  1057.         inprogress->element[j][i]->ModifyStyle(0,WS_VISIBLE);   // not visible
  1058.       } else {
  1059.         inprogress->element[j][i]->ModifyStyle(0,WS_DISABLED);  // not disabled
  1060.         inprogress->element[j][i]->ModifyStyle(WS_VISIBLE,0);   // visible
  1061.       }
  1062.     }
  1063.   }
  1064.   RedrawWindow();
  1065. }
  1066.  
  1067. BOOL Cinprogress::OnSetActive() 
  1068. {
  1069.   WHTT_LOCATION("inprogress");
  1070.     return CPropertyPage::OnSetActive();
  1071. }
  1072.